import { Module, forwardRef } from '@nestjs/common';
import { PlayerSignupService } from './service/player-signup.service';
import { PlayerSignup } from './entities/player-signup.entity';
import { TypeOrmModule } from '@nestjs/typeorm/dist/typeorm.module';
import { CreateSignupService } from './service/createSignup';
import { EventToPlayerModule } from '../event-to-player/event-to-player.module';
import { TournamentModule } from '../tournament/tournament.module';
import { PlayerSignupUploadController } from './controller/player-signup-upload.controller';
import { PlayerSignupController } from './controller/player-signup.controller';
import { PlayerSignupPairController } from './controller/player-signup-pair.controller';
import { PlayerSignupTeamController } from './controller/player-signup-team.controller';
import { EventModule } from '../event/event.module';
import { Event } from '../event/entities/event.entity';
import { ConfigModule } from '@nestjs/config';
import { PlayerSignupExportController } from './controller/player-signup-export.controller';
import { PlayerSignupExportService } from './service/player-signup-export.service';

@Module({
  imports: [
    TypeOrmModule.forFeature([PlayerSignup, Event]),
    forwardRef(() => EventToPlayerModule),
    TournamentModule,
    EventModule,
    ConfigModule,
  ],
  controllers: [
    PlayerSignupController,
    PlayerSignupUploadController,
    PlayerSignupPairController,
    PlayerSignupTeamController,
    PlayerSignupExportController,
  ],
  providers: [
    PlayerSignupService,
    CreateSignupService,
    PlayerSignupExportService,
  ],
  exports: [PlayerSignupService],
})
export class PlayerSignupModule {}
